<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1 , minimum-scale=1.0,maximum-scale =1.0,user-scalable=no">
<title>结算银行卡</title>
<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>

<style>
* {
	padding: 0px;
	margin: 0px;
}

#all {
	background-color: #F0F0F0;
	width: 100%;
	height: 100%;
}

#head {
	height: 40px;
	background-color: #019EE4;
}

#bank {
	text-align: center;
	color: #FFF;
	padding-top: 4%;
}

#center {
	background-color: #4775B7;
	width: 92%;
	height: 6rem;
	margin-left: 4%;
	margin-top: 10%;
}

#pic {
	width: 60px;
	height: 60px;
	margin-left: 5%;
	padding-top: 5%;
}

#pic img {
	width: 60px;
	height: 60px;
}

#bank_name {
	color: #FFF;
	margin-top: -20%;
	margin-left: 30%;
	font-size: 16px
}

#card_type {
	margin-top: 2%;
	margin-left: 30%;
	color: #FFF;
	font-size: 16px
}

#num {
	margin-top: 2%;
	margin-left: 30%;
	color: #FFF;
	font-size: 20px
}

#bottom {
	margin-left: 5%;
	margin-top: 11%;
	padding-top: 10%;
	color: #bababa;
	font-size: 14px
}

#huan img {
	width: 40px;
	height: 20px;
}

#huan {
	margin-top: 12%;
	margin-left: 80%;
}

#change {
	margin-top: -5%;
	margin-left: 82%;
	color: #fff;
	font-size: 12px
}

#changeall {
	
}
</style>
<script type="text/javascript">
	$(function() {
		var openID = localStorage.getItem("ll_openID");
		$.ajax({
			url : '../llPay/getCards',
			type : 'post',
			data : {
				'openID' : openID,
				'cardType' : 'debitCard'
			},
			success : function(response) {
				var info = '';
				for(var i = 0; i < response.length; i++){
					var card_no;
					if (response[i].card_no.length < 19) {
						card_no = response[i].card_no.replace(/^(\d{6})\d{6}(\d+)/,"$1********$2");//掩码的卡号
					} else {
						card_no = response[i].card_no.replace(/^(\d{6})\d{9}(\d+)/,"$1********$2");//掩码的卡号	
					};
					info += '<div id="center">';
					info += '<div id="pic"><img src=""></div>';
					info += '<div id="bank_name">'+response[i].bank_name+'</div>';
					info += '<div id="card_type">'+response[i].card_type+'</div>';
					info += '<div id="num">' + card_no + '</div>';
					info += '</div>';
				} 
				$("#head").append(info);
			}
		})
	});
	
	function openWindows(url) {
		window.location = url;
	}
</script>
</head>


<body>
	<div id="all">
		<div id="head">
			<div id="bank">结算银行卡</div>
		</div>

		<div id="changeall" onclick="openWindows('genghuanjiesuanka.html');">
			<div id="huan">
				<img src="../img/btn-genhuan.png">
			</div>
			<div id="change">更换</div>

		</div>
		<div id="bottom">
			<div>提示：</div>
			<div>只能绑定一张储蓄卡</div>
			<div>绑定后只能使用该卡进行结算</div>
			<div>若有疑问请拨打客服热线:4007676922</div>
		</div>
	</div>


</body>
</html>